Skip to content

Upgrade to symfony 7.4#557

Merged
johanib merged 32 commits intomainfrom
feature/updates-nov25
Dec 4, 2025
Merged

Upgrade to symfony 7.4#557
johanib merged 32 commits intomainfrom
feature/updates-nov25

Conversation

@johanib
Copy link
Copy Markdown
Contributor

@johanib johanib commented Nov 27, 2025

No description provided.

In test/development mode, don't flood the console with queries.

Update mariaDb version to match production.

In the devbox, we want deprecations to fail the pipeline. In Github, we don't want that, as dependabot updates or small package udates should not cause the build to fail. We will handle the deprecations once a developer works on the project.

 Add a separate deprecation.log in development mode.
Surfnet\StepupMiddleware\CommandHandlingBundle\Root\Command\FooBarCommand::$snakeCase is deprecated
MagicClosureTwigExtensionToNativeMethodsRector + attribute rules.
Prior to this change, organised imports was not enforced, but required by coding guidelines.
This would result in PR feedback about unused imports, usage of fqn in code, etc.

This change auto fixes & enforces correct import usage via phpcs / phpcbf.
…sons.

Only except camelcase method names and line lenghts.
… is accessible by default now.

RemoveReflectionSetAccessibleCallsRector
…nRector, NullToStrictStringFuncCallArgRector, FunctionFirstClassCallableRector
Tests cannot be abstract. So PHPunit does not allow it to end on 'Test' anymore.
Math is no longer needed as an explicit dependency.
xss_protection is deprecated. The recommended unsafe-inline al not allowed.
twigphp/Twig@7c38fc2

Disable doctrine automapping deprecation warning.
GetFiltersToAsTwigFilterAttributeRector
InvokableCommandInputAttributeRector
…ds on it.

Running `./bin/console` produces an error without it as jms/translation-bundle tries to instatiate it.
…ble in the cli, because they were not autoconfigured.

This change ensures they are registered by adding autoconfigure to the console_commands.yml service definition. And adds a test to validate that.
And adds autoconfigure to all other service definitions to ensure all attribute services can be picked up.
Copy link
Copy Markdown
Member

@MKodde MKodde left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Enjoy some nitpicks, questions and concerns...

Comment thread ci/qa/phpunit-ci Outdated
Comment thread src/Surfnet/Stepup/Tests/Configuration/Value/AllowedSecondFactorListTest.php Outdated
Comment thread config/services.yaml
Comment thread README.md
Comment thread README.md Outdated
Comment thread component_info
Comment thread composer.json
@johanib johanib force-pushed the feature/updates-nov25 branch 2 times, most recently from 77a29d3 to 9e949fa Compare December 2, 2025 12:20
@johanib johanib marked this pull request as ready for review December 2, 2025 12:37
@johanib johanib force-pushed the feature/updates-nov25 branch from fe4cee2 to a862c16 Compare December 2, 2025 14:51
@johanib johanib changed the title WIP: Upgrade to symfony 7.4 Upgrade to symfony 7.4 Dec 2, 2025
@johanib johanib force-pushed the feature/updates-nov25 branch from a862c16 to cab9488 Compare December 2, 2025 15:08
@johanib johanib requested a review from MKodde December 2, 2025 15:10
Copy link
Copy Markdown
Member

@MKodde MKodde left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

One final thing to discuss

#557 (comment)

Comment thread config/services.yaml
… doctrine bundle.

Instead, set the commented via the custom type.

doctrine/DoctrineBundle#977
Relying on the default column size for varchar fields is deprecated.

This change configures all varchar custom types to rely on the previous default value of 255, if not overridden.

See \Doctrine\DBAL\Platforms\AbstractPlatform::getVarcharDefaultLength

See doctrine/dbal#3263
Prior to this change, deprecation warnings about safepoints were thrown.

This change enables safepoints for all connections. Safepoints are not supported by myisam tables or drivers like sqlite.

doctrine/dbal#6272
$request->get is deprecated. $request->query->get for URL parameters or $request->request->get for POST should be used instead.

See https://symfony.com/blog/new-in-symfony-7-4-request-class-improvements

Phpstan: Fix get parameter types

Prior to this change, \Surfnet\StepupMiddleware\ApiBundle\Controller\RaCandidateController::search could receive `secondFactorTypes`, which could never be an array, yet the query expects an array.
This change ensures the query parameters for this property are read sa an array read.
… UpdateIdentityCommand

Prior to this change, `Deprecated: Creation of dynamic property` was logged when running the behat tests in devconf. This can be caused when properties are set in old events, that are later removed from the class.

We could check in the CommandValueResolver whether a field exists before setting it, but that carries more risk, in case the properties might be still read dynamically somewhere.
@johanib johanib force-pushed the feature/updates-nov25 branch from cab9488 to 95fe6a3 Compare December 4, 2025 13:40
@johanib johanib merged commit 93b57a8 into main Dec 4, 2025
2 of 3 checks passed
@johanib johanib deleted the feature/updates-nov25 branch December 4, 2025 13:45
@johanib
Copy link
Copy Markdown
Contributor Author

johanib commented Dec 4, 2025

Thanks @MKodde Good points about the autoloader and component_info.

I did a final review and did some small fixes and merged.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants